package com.zc.webnews.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.zc.webnews.fragment.BaseNews;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/11/18.
 */
public class MyNewsFragmentStatsAdapter extends FragmentStatePagerAdapter{

    List<BaseNews> list = new ArrayList<BaseNews>();

    public MyNewsFragmentStatsAdapter(FragmentManager fm) {
        super(fm);
    }

    public MyNewsFragmentStatsAdapter(FragmentManager fm,List<BaseNews> list) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {

        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }
}
